<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">


<head th:replace="fragments/common_header :: common-header(~{},~{})"></head>
<body>
<div id="wrapper">
    <!-- 左侧菜单栏-->
    <div th:replace="fragments/common_leftmenu :: left-menu"></div>
    <!-- 左侧菜单栏结束-->
    <div id="page-wrapper" class="gray-bg">
        <!-- 上部导航条 -->
        <div th:replace="fragments/common_top :: top-bar"></div>
        <!-- 上部导航条结束 -->
        <!--内容-->
        <div class="wrapper wrapper-content animated ">
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox ">
                        <div class="ibox-title">
                            <h2 th:text="'当前编辑的汽车编号：'+${order.getOrder_number()}"></h2>
                        </div>
                        <div class="ibox-content">
                            <form th:method="post" th:action="@{/order/update}">
                                <h3>编辑订单状态</h3>
                                <div class="form-group row">
                                    <div class="col-sm-4">
                                        <select class="form-control" name="order_state">
                                            <option value="">请选择</option>
                                            <option value="未完成" th:selected="${order.getOrder_state() eq '未完成'}">未完成</option>
                                            <option value="未取车" th:selected="${order.getOrder_state() eq '未取车'}">未取车</option>
                                            <option value="已取车" th:selected="${order.getOrder_state() eq '已取车'}">已取车</option>
                                            <option value="已延长" th:selected="${order.getOrder_state() eq '已延长'}">已延长</option>
                                            <option value="已完成" th:selected="${order.getOrder_state() eq '已完成'}">已完成</option>

                                        </select>
                                    </div>
                                    <!--隐藏区域开始-->
                                    <input type="hidden" class="form-control" name="order_number" th:value="${order.getOrder_number()}"/>
                                    <input type="hidden" class="form-control" name="take_time" th:value="${order.getTake_time()}"/>
                                    <input type="hidden" class="form-control" name="return_time" th:value="${order.getReturn_time()}"/>
                                    <input type="hidden" class="form-control" name="car_number" th:value="${order.getCar_number()}"/>
                                    <input type="hidden" class="form-control" name="take_shop_number" th:value="${order.getTake_shop_number()}"/>
                                    <input type="hidden" class="form-control" name="return_shop_number" th:value="${order.getReturn_shop_number()}"/>
                                    <input type="hidden" class="form-control" name="order_time" th:value="${order.getOrder_time()}"/>
                                    <input type="hidden" class="form-control" name="take_place" th:value="${order.getTake_place()}"/>
                                    <input type="hidden" class="form-control" name="take_shop_name" th:value="${order.getTake_shop_name()}"/>
                                    <input type="hidden" class="form-control" name="return_place" th:value="${order.getReturn_place()}"/>
                                    <input type="hidden" class="form-control" name="return_shop_name" th:value="${order.getReturn_shop_name()}"/>
                                    <input type="hidden" class="form-control" name="user_id" th:value="${order.getUser_id()}"/>
                                    <input type="hidden" class="form-control" name="car_type" th:value="${order.getCar_type()}"/>
                                    <input type="hidden" class="form-control" name="car_name" th:value="${order.getCar_name()}"/>
                                    <input type="hidden" class="form-control" name="order_amount" th:value="${order.getOrder_amount()}"/>
                                    <input type="hidden" class="form-control" name="car_deposit" th:value="${order.getCar_deposit()}"/>
                                    <input type="hidden" class="form-control" name="user_phone" th:value="${order.getUser_phone()}"/>
                                    <input type="hidden" class="form-control" name="order_fuwu" th:value="${order.getOrder_fuwu()}"/>
                                    <input type="hidden" class="form-control" name="order_yidi" th:value="${order.getOrder_yidi()}"/>
                                    <!--隐藏区域结束-->
                                    <div class="form-group">
                                        <div class="text-center">
                                            <button class="btn btn-white btn-lg" type="button" onclick="doCancel();">取消</button>
                                            <button class="btn btn-primary btn-lg" type="submit">保存</button>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!--内容结束-->
        <!-- 底部栏 -->
        <div th:replace="fragments/common_footer :: foot-bar"></div>
        <!-- 底部栏结束 -->
    </div>
</div>
<div th:replace="fragments/common_script :: scripts"></div>
<script>
    // 取消按钮
    function doCancel()
    {
        window.location.href = document.referrer;
    }
</script>
</body>
</html>